import js from '@eslint/js'
import pluginVue from 'eslint-plugin-vue'

export default [
  {
    name: 'app/files-to-lint',
    files: ['**/*.{js,mjs,jsx,vue}'],
  },

  {
    name: 'app/files-to-ignore',
    ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'],
  },

  {
    name: 'app/rules',
    rules: {
      'vue/multi-word-component-names': 'off', // 不在组件名称中使用下划线 -- 不在强求组件命名
      'vue/no-v-html': 'off',
      // 'vue/no-mutating-props': 'off',
      // 'vue/no-setup-props-destructure': 'off',
      // 'vue/no-unused-components': 'off',
      // 'vue/no-unused-vars': 'off',
    }
  },

  js.configs.recommended,
  ...pluginVue.configs['flat/essential'],
]
